/*
 * @Author: fangzhi 
 * @Date: 2018-04-18 15:41:04 
 * @Last Modified by: fangzhi
 * @Last Modified time: 2018-06-04 15:51:36
 */

 // 系统信息 全局状态管理
class System{
    constructor(){
        this.name = "后台管理中心";
        this.language = "CN";
        this.currentRouter = "首页";
        this.userinfo = null;
        this.theme = null;
    }
}

export default {
    state: {
        info:new System()
    },
    mutations: {
        SET_SYSTEM(state,status){
            // 设置系统状态
            state.info[status.attr] = status.value;
        }
    },
    actions: {
        _setSystemStatus({ commit } , status){
            commit("SET_SYSTEM",status)
        }
    }
}